package com.gaoshu.controller;

import com.gaoshu.bean.Departments;
import com.gaoshu.service.DepartmentsService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.RequestMapping;

import java.util.List;

@Controller
@RequestMapping("/departmentsController")
public class DepartmentsController {
    @Autowired
    private DepartmentsService departmentsService;

    //模糊查询  动态查询
    @RequestMapping("/selectDepartments.do")
    public String selectDepartments(String department){
        List<Departments> list = departmentsService.selectDepartments(department);
        return "";
    }

    //新增科室
    @RequestMapping("/addDepartments.do")
    public String addDepartments(Departments departments){
        int i=departmentsService.addDepartments(departments);
        return "";
    }
}
